package com.littledudu.example.springhessian.client;

import com.caucho.hessian.client.HessianProxyFactory;
import com.littledudu.example.springhessian.service.EchoService;

/**
 * @author hujinjun
 * @date 2015-9-22
 */
public class SampleClient {

	private static final String BASE_URL = "http://localhost/";

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		String url = BASE_URL + "EchoService";

		HessianProxyFactory factory = new HessianProxyFactory();
		EchoService echoService = (EchoService) factory.create(
				EchoService.class, url);
		//factory.setConnectTimeout();
		System.out.println(echoService.echo("hello world"));
	}

}
